class Report < ActiveRecord::Base
belongs_to :survey

validates_presence_of :description , :message => "description不可为空"
validates_presence_of :solution , :message => "solution不可为空"
validates_presence_of :name , :message => "report名不可为空"

  #def self.find_report(part_id,trend_id)
   #    sql ="select id from reports where  part_id="+part_id.to_s+" and  trend_scales_id="+trend_id.to_s
    #    id=ActiveRecord::Base.connection.execute(sql)
  #end
end
